package _0812;

import java.util.ArrayList;
import java.util.Collection;

public class CollectionDemo2 {
    public static void main(String[] args) {
        Collection collection = new ArrayList<>();
        collection.add(new Point(1, 2));
        collection.add(new Point(3, 4));
        collection.add(new Point(5, 6));
        collection.add(new Point(7, 8));
        collection.add(new Point(1, 2));
        System.out.println(collection);

        Point p = new Point(1, 2);

        boolean contains = collection.contains(p);
        System.out.println("是否包含:"+ contains);
    }
}
